import React from 'react'
import {
  Form,
  Input,
  Button,
} from 'antd-mobile'
 import { useNavigate } from 'react-router-dom'
function Index() {
    const navigate=useNavigate()
  return (
    <div>
           <Form
        layout='horizontal'
        footer={
          <Button block type='submit' color='primary' size='large' onClick={()=>navigate('/')}>
            提交
          </Button>
        }
      >
        <Form.Header>水平布局表单</Form.Header>
        <Form.Item
          name='name'
          label='姓名'
          rules={[{ required: true, message: '姓名不能为空' }]}
        >
          <Input  placeholder='请输入姓名' />
        </Form.Item>
        <Form.Item
          name='names'
          label='密码'
          rules={[{ required: true, message: '姓名不能为空' }]}
        >
          <Input  placeholder='请输入姓名' />
        </Form.Item>
       
      </Form>
    </div>
  )
}

export default Index
